/**
 * Created by Administrator on 2017/3/16 0016.
 */

import Relay from "react-relay";

export default class DeleteRoleMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { deleteRole }`;
    }

    getVariables() {
        return {
            argsInput: {
                rid: this.props.rid
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on deleteRolePayload {
            deleteRole {
                errorCode
                value
                totalResult
                id
                roleModelList{
                    name
                    pid
                   
                }
                
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
             fragment on deleteRolePayload {
                deleteRole {
                    errorCode
                    value
                    totalResult
                    id
                    roleModelList{
                        name
                        pid
                        
                    }
                    
                }
                }
            `]
        }];
    }

}